<template>
  <div>
    <!-- 搜索栏区域 -->
    <el-card class="SearchCard" body-style="padding:0px">
      <el-row>
        <el-col :span="2">
          <div class="SearchTitle">条件搜索栏</div>
        </el-col>
        <el-col :span="4">
          <el-row>
            <el-col :span="10">
              <div class="SearchLable">搜索关键字</div>
            </el-col>

            <el-col :span="14">
              <div class="SearchLable">
                <el-input placeholder="请输入内容" v-model="queryInfo.srm" clearable @clear="clearEvent"></el-input>
              </div>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="2">
          <div class="SearchLable">
            <el-button size="medium" type="primary" @click="getSearchList()">搜索</el-button>
          </div>
        </el-col>
        <el-col :span="2">
          <div class="SearchLable">
            <el-button size="medium" type="primary" @click="dialogVisible = true">新增相互作用</el-button>
          </div>
        </el-col>
      </el-row>
    </el-card>
    <el-card class="TableCard" :body-style="{ padding: '0px' }">
      <div>
        <el-table
          :data="tableData"
          border
          :header-cell-style="{ 'text-align':'center',background: '#3F9DFD', color: '#FFF' }"
          :cell-style="{'text-align':'center'}"
          size="medium"
          stripe
          style="width: 100%;font-size:12px"
          ref="table"
          :height="tableHeight"
        >
          <el-table-column type="index" width="50"></el-table-column>
          <el-table-column label="操作" width="120">
            <template slot-scope="scope">
              <el-button
                type="text"
                @click="showOneInter(scope.row.className1,scope.row.className2,scope.row.scrqryId)"
              >查看</el-button>
              <el-button type="text" @click="open(scope.row.scrqryId)">删除</el-button>
            </template>
          </el-table-column>
          <el-table-column prop="className1" label="成分1名称" width="150"></el-table-column>
          <el-table-column prop="className2" label="成分2名称" width="150"></el-table-column>
          <el-table-column prop="routeIds1" label="给药途径1" width="150"></el-table-column>
          <el-table-column prop="routeType1" label="给药途径1类型" width="150">
            <template slot-scope="scope">
              <!-- 成分1的类型 给药类型 1 全身给药 2 局部给药 3 所有方式给药 0 系统默认 -->
              {{(scope.row.routeType1==0)?"系统默认":(scope.row.routeType1==1)?"全身给药":(scope.row.routeType1==2)?"局部给药":(scope.row.routeType1==3)?"所有方式给药":""}}
            </template>
          </el-table-column>
          <el-table-column prop="routeIds2" label="给药途径2" width="150"></el-table-column>
          <el-table-column prop="routeType2" label="给药途径2类型" width="150">
            <template slot-scope="scope">
              <!-- 成分1的类型 给药类型 1 全身给药 2 局部给药 3 所有方式给药 0 系统默认 -->
              {{(scope.row.routeType2==0)?"系统默认":(scope.row.routeType2==1)?"全身给药":(scope.row.routeType2==2)?"局部给药":(scope.row.routeType2==3)?"所有方式给药":""}}
            </template>
          </el-table-column>
          <el-table-column prop="slCode" label="警示级别">
            <template
              slot-scope="scope"
            >{{(scope.row.slCode==0)?"拦截":(scope.row.slCode==1)?"禁忌":(scope.row.slCode==2)?"不推荐":(scope.row.slCode==3)?"轻微":""}}</template>
          </el-table-column>
          <el-table-column prop="warning" label="描述内容" width="200"></el-table-column>
          <el-table-column prop="articleId" label="文献名称"></el-table-column>
          <!-- <el-table-column prop="scrqryId" label="132"></el-table-column> -->
        </el-table>
      </div>
      <div class="block">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="queryInfo.page"
          :page-sizes="[20, 50, 100]"
          :page-size="queryInfo.pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="this.total"
          background
        ></el-pagination>
      </div>
    </el-card>
    <!-- 新增成分 -->
    <el-dialog title="新增相互作用" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
      <div class="addRuleAdverse">
        <el-form
          :inline="true"
          :model="addRuleData"
          class="demo-form-inline addForm"
          label-width="150px"
        >
          <el-form-item label="成分1名称">
            <el-input v-model="addRuleData.allerName1" size="medium">
              <el-button slot="append" @click="selectGenName(1)">选择</el-button>
            </el-input>
          </el-form-item>
          <el-form-item label="成分2名称">
            <el-input v-model="addRuleData.allerName2" size="medium">
              <el-button slot="append" @click="selectGenName(2)">选择</el-button>
            </el-input>
          </el-form-item>
          <el-form-item label="成分1给药途径">
            <el-input v-model="addRuleData.routeName1" size="medium">
              <el-button slot="append" @click="selectRoute(1)">选择</el-button>
            </el-input>
          </el-form-item>
          <el-form-item label="成分2给药途径">
            <el-input v-model="addRuleData.routeName2" size="medium">
              <el-button slot="append" @click="selectRoute(2)">选择</el-button>
            </el-input>
          </el-form-item>

          <el-form-item label="成分1给药类型">
            <el-select v-model="addRuleData.routeType1" size="medium" placeholder="请选择">
              <el-option
                v-for="item in RouteOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="成分2给药类型">
            <el-select v-model="addRuleData.routeType2" size="medium" placeholder="请选择">
              <el-option
                v-for="item in RouteOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="警示级别">
            <el-select v-model="addRuleData.slCode" size="medium" placeholder="请选择">
              <el-option
                v-for="item in SlOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="警示信息">
            <el-input
              v-model="addRuleData.warning"
              type="textarea"
              :autosize="{ minRows: 3, maxRows: 5}"
              placeholder="请输入内容"
            ></el-input>
          </el-form-item>

          <el-form-item label="标题">
            <el-input
              v-model="addRuleData.title"
              type="textarea"
              :autosize="{ minRows: 3, maxRows: 5}"
              size="medium"
            ></el-input>
          </el-form-item>
          <el-form-item label="描述">
            <el-input
              v-model="addRuleData.abstractDesc"
              type="textarea"
              :autosize="{ minRows: 3, maxRows: 5}"
              size="medium"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="addRule()">新 增</el-button>
        <el-button @click="dialogVisible = false">取 消</el-button>
      </span>
    </el-dialog>
    <!-- 成分 -->
    <el-dialog
      title="选择成分"
      :visible.sync="GenNameVisible"
      class="editDialog"
      width="30%"
      :before-close="handleClose"
    >
      <div style="width:100%;height:527px">
        <div class="addInput">
          <el-input v-model="AllerData.srm" size="small" placeholder="请输入内容"></el-input>
          <el-button style="margin-right:8px" type="primary" size="small" @click="SearchDrug()">搜索</el-button>
        </div>
        <el-table
          :data="AllerData.tableData"
          stripe
          border
          height="400"
          style="width: 100%;font-size: 10px"
          :header-cell-style="{'text-align':'center'}"
          :row-style="{height:'40px'}"
          :cell-style="{'text-align':'center',padding:'0px'}"
          @row-click="handleRow"
          @selection-change="handleSelectionChange"
        >
          <el-table-column label width="35">
            <template slot-scope="scope">
              <el-radio
                :label="scope.row"
                v-model="AllerData.radioId"
                @change.native="handleSelectionChange(scope.row)"
              ></el-radio>
            </template>
          </el-table-column>

          <el-table-column prop="id" width="150" label="成分编码"></el-table-column>
          <el-table-column prop="allerName" label="成分名称"></el-table-column>
        </el-table>

        <div class="dialogBlock">
          <el-pagination
            @size-change="handleSizeChange1"
            @current-change="handleCurrentChange1"
            current-page.sync="1"
            :page-size="100"
            layout="total, prev, pager, next"
            :total="AllerData.total"
          ></el-pagination>
        </div>
        <span slot="footer" class="dialog-footer">
          <div class="SortFoot">
            <el-button
              style="margin-right:8px"
              type="primary"
              size="small"
              @click="SelectRenName()"
            >确定</el-button>
            <el-button style="margin-right:8px" @click="GenNameVisible = false" size="small">取消</el-button>
          </div>
        </span>
      </div>
    </el-dialog>
    <!-- 给药途径 -->
    <el-dialog
      title="选择给药途径"
      :visible.sync="RouteVisible"
      class="editDialog"
      width="30%"
      :before-close="handleClose"
    >
      <div style="width:100%;height:527px">
        <div class="addInput">
          <el-input v-model="RouteData.srm" size="small" placeholder="请输入内容"></el-input>
          <el-button style="margin-right:8px" type="primary" size="small" @click="SearchDrug()">搜索</el-button>
        </div>
        <el-table
          :data="RouteData.tableData"
          stripe
          border
          height="400"
          style="width: 100%;font-size: 10px"
          :header-cell-style="{'text-align':'center'}"
          :row-style="{height:'40px'}"
          :cell-style="{'text-align':'center',padding:'0px'}"
          @row-click="handleRow1"
          @selection-change="handleSelectionChange1"
        >
          <el-table-column label width="35">
            <template slot-scope="scope">
              <el-radio
                :label="scope.row"
                v-model="RouteData.radioId"
                @change.native="handleSelectionChange1(scope.row)"
              ></el-radio>
            </template>
          </el-table-column>
          <el-table-column prop="routeId" width="150" label="给药途径名称"></el-table-column>
          <el-table-column prop="routeName" label="给药途径名称"></el-table-column>
        </el-table>
        <div class="dialogBlock">
          <el-pagination
            @size-change="handleSizeChange1"
            @current-change="handleCurrentChange1"
            current-page.sync="1"
            :page-size="100"
            layout="total, prev, pager, next"
            :total="RouteData.total"
          ></el-pagination>
        </div>
        <span slot="footer" class="dialog-footer">
          <div class="SortFoot">
            <el-button
              style="margin-right:8px"
              type="primary"
              size="small"
              @click="SelectRoute()"
            >确定</el-button>
            <el-button style="margin-right:8px" @click="GenNameVisible = false" size="small">取消</el-button>
          </div>
        </span>
      </div>
    </el-dialog>
    <!-- 查看一条相互作用规则 -->
    <el-dialog
      :title="'查看相互作用——'+this.ShowOneData.title1+','+this.ShowOneData.title2"
      :visible.sync="ShowOneVisible"
      width="50%"
      :before-close="handleClose"
    >
      <div class="addRuleAdverse">
        <el-form
          :inline="true"
          :model="ShowOneData"
          class="demo-form-inline addForm"
          label-width="150px"
        >
          <el-form-item label="成分1名称">
            <el-input v-model="ShowOneData.className1" size="medium">
              <el-button slot="append" @click="selectGenName(3)">选择</el-button>
            </el-input>
          </el-form-item>
          <el-form-item label="成分2名称">
            <el-input v-model="ShowOneData.className2" size="medium">
              <el-button slot="append" @click="selectGenName(4)">选择</el-button>
            </el-input>
          </el-form-item>
          <el-form-item label="成分1给药途径">
            <el-input v-model="ShowOneData.routeIds1" size="medium">
              <el-button slot="append" @click="selectRoute(1)">选择</el-button>
            </el-input>
          </el-form-item>

          <el-form-item label="成分2给药途径">
            <el-input v-model="ShowOneData.routeIds2" size="medium">
              <el-button slot="append" @click="selectRoute(2)">选择</el-button>
            </el-input>
          </el-form-item>
          <el-form-item label="成分1给药类型">
            <el-select v-model="ShowOneData.routeType1" size="medium" placeholder="请选择">
              <el-option
                v-for="item in RouteOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="成分2给药类型">
            <el-select v-model="ShowOneData.routeType2" size="medium" placeholder="请选择">
              <el-option
                v-for="item in RouteOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="警示级别">
            <el-select v-model="ShowOneData.slCode" size="medium" placeholder="请选择">
              <el-option
                v-for="item in SlOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="警示信息">
            <el-input
              v-model="ShowOneData.warning"
              type="textarea"
              :autosize="{ minRows: 3, maxRows: 5}"
              placeholder="请输入内容"
            ></el-input>
          </el-form-item>

          <el-form-item label="标题">
            <el-input
              v-model="ShowOneData.title"
              type="textarea"
              :autosize="{ minRows: 3, maxRows: 5}"
              size="medium"
            ></el-input>
          </el-form-item>
          <el-form-item label="描述">
            <el-input
              v-model="ShowOneData.abstractDesc"
              type="textarea"
              :autosize="{ minRows: 3, maxRows: 5}"
              size="medium"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="upDataOneInter()">更 新</el-button>
        <el-button @click="ShowOneVisible = false">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { getRuleListInter, getAllergen, upDataOneInter } from "@/api/rad";
export default {
  data() {
    return {
      tableHeight: 250,
      multipleSelection: {},
      queryInfo: {
        srm: "",
        page: 1, //当前页数
        pageSize: 20, //每页显示的数量
      },
      total: 0,
      tableData: [],
      dialogVisible: false,
      addRuleData: {
        load: 0,
        allerName1: "",
        className1: "",
        allerName2: "",
        className2: "",
        routeType1: "",

        routeName1: "",
        routeIds1: "",

        routeType2: "",
        routeName2: "",

        routeIds2: "",
        slCode: "",
        warning: "",
        title: "",
        abstractDesc: "",
      },
      RouteOptions: [
        {
          value: 0,
          label: "系统默认",
        },
        {
          value: 1,
          label: "全身给药",
        },
        {
          value: 2,
          label: "局部给药",
        },
        {
          value: 3,
          label: "所有方式给药",
        },
      ],
      // 0：拦截 ，1：禁忌，2：不推荐，3：轻微
      SlOptions: [
        {
          value: 0,
          label: "拦截",
        },
        {
          value: 1,
          label: "禁忌",
        },
        {
          value: 2,
          label: "不推荐",
        },
        {
          value: 3,
          label: "轻微",
        },
      ],
      GenNameVisible: false,
      GenNameData: {
        total: 0,
        GenNameTableData: [],
      },
      GenNameVisible: false,
      AllerData: {
        srm: "",
        page: 1,
        pageSize: 20,
        tableData: [],
        total: 0,
        radioId: [],
      },
      RouteVisible: false,
      RouteData: {
        load: 0,
        srm: "",
        page: 1,
        pageSize: 20,
        tableData: [],
        total: 0,
        radioId: [],
      },
      ShowOneVisible: false,
      ShowOneData: {
        title1: "",
        title2: "",
        scrqryId: "",
        className1: "",
        className2: "",
        routeType1: "",
        routeIds1: "",
        routeType2: "",
        routeIds2: "",
        slCode: "",
        warning: "",
        title: "",
        abstractDesc: "",
        scrqryId: "",
        articleId: "",
      },
    };
  },
  mounted: function () {
    this.$nextTick(function () {
      this.tableHeight =
        window.innerHeight - this.$refs.table.$el.offsetTop - 50;
      // 监听窗口大小变化
      let self = this;
      window.onresize = function () {
        self.tableHeight =
          window.innerHeight - self.$refs.table.$el.offsetTop - 50;
      };
    });
  },
  created: function () {
    this.getRuleListInter();
  },
  methods: {
    handleClose(done) {
      done();
    },
    handleSizeChange(newSize) {
      this.queryInfo.pageSize = newSize;
      this.getRuleListInter();
    },
    handleCurrentChange(newPage) {
      this.queryInfo.page = newPage;
      this.getRuleListInter();
    },
    handleSizeChange1(newSize) {
      this.AllerData.pageSize = newSize;
      this.getAllergen();
    },
    handleCurrentChange1(newPage) {
      this.AllerData.page = newPage;
      this.getAllergen();
    },
    async getRuleListInter() {
      let res = await this.$rad.getRuleListInter({
        srm: this.queryInfo.srm,
        page: this.queryInfo.page,
        pageSize: this.queryInfo.pageSize,
      });
      console.log(res);
      this.tableData = res.rows;
      this.total = res.total;
    },
    getSearchList() {
      this.queryInfo.page = 1;
      this.getRuleListInter();
    },
    selectGenName(load) {
      this.addRuleData.load = load;
      this.GenNameVisible = true;
      this.getAllergen();
    },
    async getAllergen() {
      let res = await this.$rad.getAllergen({
        srm: this.AllerData.srm,
        page: this.AllerData.page,
        pageSize: this.AllerData.pageSize,
      });
      console.log(res);
      this.AllerData.tableData = res.rows;
      this.AllerData.total = res.total;
    },
    SelectRenName() {
      console.log(this.AllerData.radioId);
      if (this.addRuleData.load == 1) {
        this.addRuleData.allerName1 = this.AllerData.radioId.allerName;
        this.addRuleData.className1 = this.AllerData.radioId.id;
      } else if (this.addRuleData.load == 2) {
        this.addRuleData.allerName2 = this.AllerData.radioId.allerName;
        this.addRuleData.className2 = this.AllerData.radioId.id;
      } else if (this.addRuleData.load == 3) {
        // this.ShowOneData.allerName2 = this.AllerData.radioId.allerName;
        this.ShowOneData.className1 = this.AllerData.radioId.allerName;
      } else if (this.addRuleData.load == 4) {
        // this.ShowOneData.allerName2 = this.AllerData.radioId.allerName;
        this.ShowOneData.className2 = this.AllerData.radioId.allerName;
      }
      this.GenNameVisible = false;
    },

    selectRoute(load) {
      this.RouteData.load = load;
      this.RouteVisible = true;
      this.getRouteList();
    },
    async getRouteList() {
      let res = await this.$rad.getRoute({
        srm: this.RouteData.srm,
        page: this.RouteData.page,
        pageSize: this.RouteData.pageSize,
      });
      console.log(res);
      this.RouteData.tableData = res.rows;
      this.RouteData.total = res.total;
    },
    SelectRoute() {
      console.log(this.RouteData.radioId);
      if (this.RouteData.load == 1) {
        this.addRuleData.routeName1 = this.RouteData.radioId.routeName;
        this.addRuleData.routeIds1 = this.RouteData.radioId.routeId;
      } else if (this.RouteData.load == 2) {
        this.addRuleData.routeName2 = this.RouteData.radioId.routeName;
        this.addRuleData.routeIds2 = this.RouteData.radioId.routeId;
      }
      this.RouteVisible = false;
    },
    clearEvent() {},

    SelectRen() {},
    async addRule() {
      console.log(this.addRuleData);
      if (this.addRuleData.allerName1 === "") {
        return this.$message({
          type: "warning",
          message: "未选择成分1",
        });
      } else if (this.addRuleData.allerName2 === "") {
        return this.$message({
          type: "warning",
          message: "未选择成分2",
        });
      } else if (this.addRuleData.routeType1 === "") {
        return this.$message({
          type: "warning",
          message: "未选择成分1的类型",
        });
      } else if (this.addRuleData.routeType2 === "") {
        return this.$message({
          type: "warning",
          message: "未选择成分2的类型",
        });
      } else if (this.addRuleData.routeIds1 === "") {
        return this.$message({
          type: "warning",
          message: "未选择成分1给药途径",
        });
      } else if (this.addRuleData.routeIds2 === "") {
        return this.$message({
          type: "warning",
          message: "未选择成分2给药途径",
        });
      } else if (this.addRuleData.slCode === "") {
        return this.$message({
          type: "warning",
          message: "未选择警示级别",
        });
      } else if (this.addRuleData.warning === "") {
        return this.$message({
          type: "warning",
          message: "警示信息为空",
        });
      } else if (this.addRuleData.title === "") {
        return this.$message({
          type: "warning",
          message: "标题为空",
        });
      } else if (this.addRuleData.abstractDesc === "") {
        return this.$message({
          type: "warning",
          message: "描述为空",
        });
      } else {
        let res = await this.$rad.getRuleInterInfo({
          className1: this.addRuleData.allerName1,
          className2: this.addRuleData.allerName2,
          routeType1: this.addRuleData.routeType1,
          routeIds1: this.addRuleData.routeIds1,
          routeIds1Name: this.addRuleData.routeName1,
          routeType2: this.addRuleData.routeType2,
          routeIds2Name: this.addRuleData.routeName2,
          routeIds2: this.addRuleData.routeIds2,
          slCode: this.addRuleData.slCode,
          warning: this.addRuleData.warning,
          title: this.addRuleData.title,
          abstractDesc: this.addRuleData.abstractDesc,
        });
        console.log(res);
        if (res.code == 1) {
          this.dialogVisible = false;
          this.getRuleListInter();
          return this.$message({
            type: "success",
            message: res.msg,
          });
        } else {
          return this.$message({
            type: "error",
            message: res.msg,
          });
        }
      }
    },
    showOneInter(title1, title2, scrqryId) {
      this.ShowOneData.title1 = title1;
      this.ShowOneData.title2 = title2;
      this.ShowOneData.scrqryId = scrqryId;
      this.ShowOneVisible = true;
      this.ShowOneInterData();
    },
    async ShowOneInterData() {
      let res = await this.$rad.getRuleInterOne({
        scrqryId: this.ShowOneData.scrqryId,
      });
      console.log(res);
      this.ShowOneData.className1 = res.data.className1;
      this.ShowOneData.className2 = res.data.className2;
      this.ShowOneData.routeType1 = res.data.routeType1;
      this.ShowOneData.routeIds1 = res.data.routeIds1;
      this.ShowOneData.routeType2 = res.data.routeType2;
      this.ShowOneData.routeIds2 = res.data.routeIds2;
      this.ShowOneData.slCode = res.data.slCode;
      this.ShowOneData.warning = res.data.warning;
      this.ShowOneData.title = res.data.title;
      this.ShowOneData.abstractDesc = res.data.abstractDesc;
      this.ShowOneData.scrqryId = res.data.scrqryId;
      this.ShowOneData.articleId = res.data.articleId;
    },
    async upDataOneInter() {
      let res = await this.$rad.upDataOneInter({
        articleId: this.ShowOneData.articleId,
        scrqryId: this.ShowOneData.scrqryId,
        className1: this.ShowOneData.className1,
        className2: this.ShowOneData.className2,
        routeType1: this.ShowOneData.routeType1,
        routeIds1: this.ShowOneData.routeIds1,
        routeType2: this.ShowOneData.routeType2,
        routeIds2: this.ShowOneData.routeIds2,
        slCode: this.ShowOneData.slCode,
        warning: this.ShowOneData.warning,
        title: this.ShowOneData.title,
        abstractDesc: this.ShowOneData.abstractDesc,
      });
      console.log(res);
      if (res.code == 1) {
        this.ShowOneVisible = false;
        this.getRuleListInter();
        return this.$message({
          type: "success",
          message: res.msg,
        });
      } else {
        return this.$message({
          type: "error",
          message: res.msg,
        });
      }
    },
    open(scrqryId) {
      this.$confirm("此操作将永久删除该规则, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.deleteInter(scrqryId);
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    async deleteInter(scrqryId) {
      let res = await this.$rad.deleteInter({
        scrqryId: scrqryId,
      });
      console.log(res);
      if (res.code == 1) {
        return this.$message({
          type: "success",
          message: res.msg,
        });
      } else {
      }
    },
    handleRow(row) {
      console.log(row);
      this.AllerData.radioId = row;
      this.multipleSelection = row;
    },
    handleSelectionChange(val) {
      console.log(res);
      this.multipleSelection = val;
    },
    handleRow1(row) {
      console.log(row);
      this.RouteData.radioId = row;
      this.multipleSelection = row;
    },
    handleSelectionChange1(val) {
      console.log(res);
      this.multipleSelection = val;
    },
  },
};
</script>
<style scoped>
.SearchCard {
  height: 50px;
  font-size: 12px;
}
.SearchTitle {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-right: 1px solid #c2c2c2;
}
.SearchLable {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.TableCard {
  margin-left: 3px;
  margin-top: 2px;
}
.block {
  text-align: center;
  margin-top: 12px;
  margin-bottom: 12px;
}
.editDialog >>> .el-dialog__header {
  margin-bottom: 0px;
}
.editDialog >>> .el-dialog__body {
  padding-left: 0px;
  padding-right: 0px;
}
.addInput {
  height: 45px;
  display: flex;
  align-items: center;
}
.SortFoot {
  height: 50px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.addInput >>> .el-input {
  width: 40%;
  margin-left: 8px;
}
.addInput >>> .el-button {
  margin-left: 8px;
}
.dialogBlock {
  margin-top: 0px;
  margin-bottom: 0px;
}
.adverseCard >>> .el-input {
  width: 60%;
}
.adverseCard >>> .el-input {
  width: 120px;
}
.addForm >>> .el-form-item__content {
  width: 200px;
}
</style>